package com.zwps.common.core.context;

import com.zwps.extra.http.LogAPIMessage;

/**
 * 请求记录器
 * 
 * @ClassName: RequestRecorderContext
 * @Description:
 * @author lyh
 * @date 2023年10月19日 下午8:22:36
 *
 */
public class RecordAPILogContext {

    private static ThreadLocal<LogAPIMessage> LOG = new ThreadLocal<LogAPIMessage>();

    public static void setRequestLog(LogAPIMessage dto) {
        LOG.set(dto);
    }

    public static LogAPIMessage getRequestLog() {
        return LOG.get();
    }

    public static void clear() {
        LOG.remove();
    }
}
